package com.mathew.spring.appsp.model;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BookService {

  @Autowired
  BookMapper mapper;

  public int addBook(Book book) {
    return mapper.addBook(book);
  }

  public int deleteById(Integer id) {
    return mapper.deleteBookById(id);
  }

  public Book selectBook(Integer id) {
    return mapper.selectBook(id);
  }

  public String selectBookName(Integer id) {
    return mapper.selectBookNameById(id);
  }

}
